//
// Created by gogoqiu on 2021/10/21.
//

#ifndef RAPIDSVN_CMAKE_MYLOGMONITOR_H
#define RAPIDSVN_CMAKE_MYLOGMONITOR_H

#include <action.hpp>

//
class MyLogMonitorAction: public NormalAction {
public:
    bool Prepare() override;
    bool Perform() override;

protected:
    //int len;
private:

    static int respLength;
    static char* responseText;

    void read_msg ( int fd );
    int netlink_notify (  );
    void print_flags ( unsigned flags, unsigned change );
    void print_type ( unsigned type );
    void OnTrigger();

    int SetGitIP( const char* url );

    void refresh();
    int count;

    static size_t accumulate(void* buffer,size_t size,size_t num_mem_byte,void *stream/** ignore **/);
};

class MyLogMonitorThread: public wxThread{

};

#endif //RAPIDSVN_CMAKE_MYLOGMONITOR_H
